/**
 * 值为admin的权限表示系统未录入
  * imprest: 工单预收款
  * dispatch: 工单派单 
  * ticketRefund:工单退款
  * workOrderCollection: 工单收款
  * insProject: 工单增项
  * workOrderRework: 工单返工
  * returnMaterial: 工单退料
*/
let option = {
  //快速单
  authorityID1: {
    imprest: 'rapid:imprest',
    dispatch: 'rapid:dispatch',
    ticketRefund: 'admin',
    workOrderCollection: 'admin',
    insProject: "rapid:insProject",
    workOrderRework: 'admin',
    returnMaterial: 'admin',
  },
  //洗车单
  authorityID2: {
    imprest: 'wash:imprest',
    dispatch: 'wash:dispatch',
    ticketRefund: 'admin',
    workOrderCollection: 'admin',
    insProject: "wash:insProject",
    workOrderRework: 'admin',
    returnMaterial: 'admin',
  },
  //综合单
  authorityID3: {
    imprest: 'synthesize:imprest',
    dispatch: 'synthesize:dispatch',
    ticketRefund: 'admin',
    workOrderCollection: 'admin',
    insProject: "synthesize:insProject",
    workOrderRework: 'admin',
    returnMaterial: 'synthesize:returnMaterial',
  },
  //报价单
  authorityID4: {
    imprest: 'admin',
    dispatch: 'sadmin',
    ticketRefund: 'admin',
    workOrderCollection: 'admin',
    insProject: "admin",
    workOrderRework: 'admin',
    returnMaterial: 'admin',
  },
  //销售单
  authorityID5: {
    imprest: 'admin',
    dispatch: 'sell:dispatch',
    ticketRefund: 'admin',
    workOrderCollection: 'admin',
    insProject: "admin",
    workOrderRework: 'admin',
    returnMaterial: 'admin',
  }
}
export default function authority (authorityId = null) {
  if (authority) {
    return option[`authorityID${authorityId}`]
  }
}